# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Balló György <ballogyor+arch at gmail dot com>

pkgname=libhandy
pkgver=1.4.0
pkgrel=1
pkgdesc="Library full of GTK+ widgets for mobile phones"
url="https://gitlab.gnome.org/GNOME/libhandy"
arch=(x86_64)
license=(LGPL)
depends=(glib2 gtk3)
makedepends=(git gobject-introspection meson vala glade)
checkdepends=(xorg-server-xvfb)
provides=(libhandy-1.so)
_commit=f8626427acebfa08b2b4ee1166d51e416d3d7407  # tags/1.4.0^0
source=("git+https://gitlab.gnome.org/GNOME/libhandy.git#commit=$_commit")
sha256sums=('SKIP')

prepare() {
  cd libhandy
}

pkgver() {
  cd libhandy
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  arch-meson libhandy build \
    -D gtk_doc=true
  meson compile -C build
}

check() {
  dbus-run-session xvfb-run -s '-nolisten local' \
    meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 et:
